# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-should-dsl
pkgver=2.1.2
_commit=ded0323344f21311f366ffc711b65245aafc11f1
pkgrel=4
pkgdesc="Should assertions in Python as clear and readable as possible"
url="https://github.com/nsi-iff/should-dsl"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
source=("https://github.com/nsi-iff/should-dsl/archive/$_commit/$pkgname-$_commit.tar.gz")
sha512sums=('4e3d9b5066828c9b7d01ff9f2941ff92715cd576667c9ebe96d07bf037221ce1ee2fb3378844852cbe56560257073d4747e0fa079964809c18c349c3b3543e8b')

build() {
  cd should-dsl-$_commit
  python setup.py build
}

check() {
  cd should-dsl-$_commit
  python run_all_examples.py
}

package() {
  cd should-dsl-$_commit
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
